IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cms_sp_EntityMetaFieldLinkSave]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[cms_sp_EntityMetaFieldLinkSave]
GO

create procedure [dbo].[cms_sp_EntityMetaFieldLinkSave]
(
	@Id int,
	@EntityMetaFieldId int,
    @EntityTypeParameter nvarchar(400),
    @DisplayLabel nvarchar(150),
    @IsAllowMultipleValues bit,
    @MetaFieldValues nvarchar(max),
    @IsRequired bit,
    @MetaFieldOrder int,
	@DefaultValue nvarchar(max),
	@EditorName nvarchar(255)
)

as

update [EntityMetaFieldLinks]           
     set
           EntityMetaFieldId = @EntityMetaFieldId,
           EntityTypeParameter = @EntityTypeParameter,
           DisplayLabel = @DisplayLabel,
           IsAllowMultipleValues = @IsAllowMultipleValues,
           MetaFieldValues = @MetaFieldValues,
           IsRequired = @IsRequired,
           MetaFieldOrder = @MetaFieldOrder,
		   DefaultValue = @DefaultValue,
		   EditorName = @EditorName
where EntityMetaFieldLinkId = @Id


GO


